
/* <<< COPYRIGHT START >>>
 * Copyright 2006-Present OxygenSoftwareLibrary.com
 * Licensed under the GNU Lesser General Public License.
 * http://www.gnu.org/licenses/lgpl.html
 * 
 * @author: Ugorji Dick-Nwoke
 * <<< COPYRIGHT END >>>
 */


package oxygen.forum.data;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

@MappedSuperclass
public abstract class ForumEntity implements Serializable, Comparable {
  @Version 
  @Column(name="f_version", nullable=false)
  private Long version;
  
  public abstract Long getId();
  public abstract void setId(Long id);
  
  public int compareTo(Object o) {
    return getId().compareTo(((ForumEntity)o).getId());
  }
  public Long getVersion() {
    return version;
  }
  public void setVersion(Long version) {
    this.version = version;
  }

}

